#! /usr/bin/python

import sys
out = open('/home/chillu/.cmus/status', 'w')
length, i = len(sys.argv), 1;
while i + 1 < length :
    if sys.argv[i] == 'duration' :
        dur = int(sys.argv[i + 1])
        print >> out, '%s:%d:%02d' % (sys.argv[i], dur/60, dur%60)
    else :
        print >> out, '%s:%s' % (sys.argv[i], sys.argv[i + 1])
    i = i + 2
